#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main(int argc,const char*argv[])
{
    pid_t pid;
    pid = fork();
    if(pid<0)
    {
        perror("folk err");
        return -1;
    }
    else if(pid == 0)
    {
        //in child
        printf("in child\n");
    }
    else 
    {
        //in parent
        printf("in parent\n");
    }
    return 0;
}